//
//  DINGMicroblogUser.swift
//  0730Microblog
//
//  Created by ding on 15/8/6.
//  Copyright © 2015年 ding. All rights reserved.
//

import UIKit

class DINGMicroblogUser: NSObject {
 /// 用户UID
    var id: Int = 0
 /// 友好显示名称
    var name: String?
/// 用户头像地址（中图），50×50像素
    var profile_image_url: String?
/// 用户认证类型: -1代表没有认证，0代表认证用户，2、3、5代表企业认证，220代表达人
    var verified_type: Int = -1
    var verifiedImgString: String? {
            switch verified_type {
                case 0: return "avatar_vip"
                case 2, 3, 5: return "avatar_enterprise_vip"
                case 220: return "avatar_grassroot"
                default: return nil
            
        }
    }
/// 会员等级：1~6级
    var mbrank: Int = -1
    var mbrankImgString: String? {
            switch mbrank {
            case 1: return "common_icon_membership_level1"
            case 2: return "common_icon_membership_level2"
            case 3: return "common_icon_membership_level3"
            case 4: return "common_icon_membership_level4"
            case 5: return "common_icon_membership_level5"
            case 6: return "common_icon_membership_level6"
            default: return nil
        }
    }
    
    init(dict: [String : AnyObject]) {
        super.init()
        
        setValuesForKeysWithDictionary(dict)
    }
    
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {}
    
    override var description: String {
        let keys = ["id", "name", "profile_image_url", "verified_type", "mbrank"]
        return "\(dictionaryWithValuesForKeys(keys))"
    }
    

}
